<include file="Public:head"/>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>订单列表</h5>
                    <div class="ibox-tools" style="margin-top: -9px;">
                        <a href="javascript:location.reload();" class="btn btn-primary"><i class="fa fa-refresh"></i> 刷新</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">

                        </div>
                        <form class="form-inline" action="" method="get">
                            <div class="col-sm-10 pull-right">
                                <div class="input-group col-sm-3  pull-right">
                                    <input type="text" name="product_name" placeholder="" class="input-sm form-control">
			                                    <span class="input-group-btn">
			                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
			                                    </span>
                                </div>

                            </div>
                        </form>
                    </div>

                    <br />

                    <div class="table-responsive">
                        <form action="__URL__/operate" method="post" id="operate_form">
                            <table class="table table-bordered table-hover"
                                   id="categoryTable">
                                <thead>
                                <tr class="active">
                                    <th width="30"><input onclick="choosebox(this)" type="checkbox" /></th>
                                    <th height="40">编号</th>
                                    <th>会员</th>
                                    <th>提现金额</th>
                                    <th>提现手续费</th>
                                    <th>手机号码</th>
                                    <th>银行卡号</th>
                                    <th>审核状态</th>
                                    <th>是否提现（到账）</th>
                                    <th>创建时间</th>
                                    <th>审核时间</th>
                                    <!-- <th>到账时间</th> -->
                                    <th width="80">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                    <volist name="wd_result" id="vo">
                                        <tr>
                                            <td><input onclick="choosebox(this)" type="checkbox" /></td>
                                            <td>{$vo.id}</td>
                                            <td>{$vo.user}</td>
                                            <td>{$vo.money}</td>
                                            <td>{$vo.poundage}</td>
                                            <td>{$vo.mobile}</td>
                                            <td>{$vo.card_num}</td>
                                            <td>
                                                <switch name="$vo.status">
                                                    <case value="0">待审核</case>
                                                    <case value="1">通过审核</case>
                                                    <case value="-1">不通过</case>
                                                </switch>
                                            </td>
                                            <td>
                                                <switch name="$vo.display">
                                                    <case value="0">未操作</case>
                                                    <case value="1">已提现</case>
                                                    <case value="-1">未提现</case>
                                                </switch>
                                            </td>
                                            <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                                            <td>
                                                <if condition="$vo.check_time=='0'">
                                                未审核
                                                <else/>
                                                {$vo.check_time|date="Y-m-d H:i:s",###}
                                                </if>
                                            </td>
                                            <!-- <td>
                                                <if condition="$vo.finish_time=='0'">
                                                    未到账
                                                    <else/>
                                                    {$vo.finish_time|date="Y-m-d H:i:s",###}
                                                </if>
                                            </td> -->
                                            <td>
                                                <if condition="$vo.status eq 0">
                                                    <a href="{:url('Withdraw/withdrawCheck',array('id'=>$vo.id))}" data-id="{$vo.id}"  class="btn btn-primary">审核</a>
                                                </if>
                                            </td>
                                        </tr>
                                    </volist>

                                </tbody>
                            </table>
                        </form>
                        <div class="col-sm-12" style="padding:0px;">
                            <ul class="pagination  pull-right">
                                {$page}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<script>
    //日期范围
    laydate.render({
        elem: '#time'
        ,range: true
    });

    function do_wd(){
        var id = $(this).attr('_id');
        var display = $(this).attr('data_id');
        parent.layer.confirm('确定进行提现？', {
            shade:false,
            btn: ['确定', '取消']
        }, function() {
            $.post("{:url('Withdraw/doWithdraw')}", {id: id,status:status}, function (result) {
                if (result.code == '0') {
                    parent.layer.msg(result.msg,{
                        icon:2,
                        time:1000
                    });
                } else {
                    parent.layer.msg(result.msg, {
                                icon:1,
                                time:1000
                            },
                            function (index, item) {
//								parent.layer.close(index);
                                location.reload();
                            });
                }
            });
        });
    }
</script>

</body>

</html>